package com.geotmt.billingcenter.modules.consume.mapper.provider;

import com.geotmt.billingcenter.common.entry.ConsumeRuleEntry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description 消耗 Rule SQL类
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/3/13 11:22
 * @Version     v1
 **/
public class ConsumeRuleProvider {

    private static final Logger logger = LoggerFactory.getLogger(ConsumeRuleProvider.class);

    /**
     * 消耗 consume
     * @param consumeRule
     * @return
     */
    public String addRule(ConsumeRuleEntry consumeRule){
        StringBuffer sql = new StringBuffer();
        sql.append("INSERT INTO `fin_consume_curr_conf_rule`")
                .append(" (price,discount,stair_cycle,stair_start_time)")
                .append(" VALUES")
                .append(" (#{price},#{discount},#{stairCycle},#{stairStartTime})");

        logger.info("消耗 subRule SQL:{}",sql);
        return sql.toString();
    }
}
